﻿<UserControl x:Class="GTServices.WPF.Client.Views.RootView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:entities="clr-namespace:GTServices.Entities;assembly=GTServices.Entities"
             xmlns:cal="clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro"
             xmlns:controls="clr-namespace:GTServices.WPF.Client.Controls"
             mc:Ignorable="d" 
             d:DesignHeight="500" d:DesignWidth="900">
    <DockPanel LastChildFill="True">
        <Menu DockPanel.Dock="Top">
            <MenuItem Header="File">
                <MenuItem x:Name="SaveAll" Header="Save Definitions To DB" />
                <MenuItem x:Name="Exit" Header="Exit" />
            </MenuItem>
            
            <MenuItem x:Name="ShowOptions" Header="Options" />
            <MenuItem x:Name="Manage"      Header="Manage" />
           
            <MenuItem x:Name="Search" Header="Search" />
          
            <MenuItem x:Name="Import" Header="Import">
                <MenuItem x:Name="ImportEntityXml" Header="EntityXml" />
                <MenuItem Header="Patterns">
                    <MenuItem x:Name="ImportPatternsFromTxt" Header="FromTxt" />
                </MenuItem> 
            </MenuItem>
            
            <MenuItem x:Name="Test" Header="Test" />
        </Menu>
        <DockPanel DockPanel.Dock="Bottom">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="85*"/>
                    <RowDefinition Height="15*"/>
                </Grid.RowDefinitions>
                <Grid Grid.Row="0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="20*" />
                        <ColumnDefinition Width="5" />
                        <ColumnDefinition Width="80*"/>
                    </Grid.ColumnDefinitions>
                    <ContentControl cal:View.Model="{Binding SelectCategoriesViewModel}" DockPanel.Dock="Left" Grid.Column="0" />
                    <GridSplitter Grid.Column="1"
                                  HorizontalAlignment="Center"
                                  VerticalAlignment="Stretch"
                                  ShowsPreview="True"
                                  Width="5"
                                  />
                      <ContentControl cal:View.Model="{Binding SearchResultsTreeView}" DockPanel.Dock="Right" Grid.Column="2"/> 
                </Grid>
                <StackPanel Grid.Row="1" VerticalAlignment="Bottom">
                    <StackPanel Orientation="Horizontal">
                        <GroupBox Header="Directory">
                            <StackPanel Orientation="Horizontal">
                                <TextBox Width="600" Text="{Binding Path, UpdateSourceTrigger=PropertyChanged}" />
                                <controls:ClickableLabel cal:Message.Attach="[Event Click] = [Action PickDir()]" Text="Select" />
                                <controls:ClickableLabel cal:Message.Attach="[Event Click] = [Action ShowDirectoryFilters()]" Text="Filter" />
                            </StackPanel>
                        </GroupBox>
                        <GroupBox Header="Controls">
                            <controls:ClickableLabel cal:Message.Attach="[Event Click] = [Action Start()]" Text="Start" />
                        </GroupBox>
                    </StackPanel>
                    <StatusBar>
                        <StatusBarItem>
                            <StackPanel Orientation="Horizontal">
                                <TextBlock Text="{Binding Status}" />
                            </StackPanel>
                        </StatusBarItem>
                    </StatusBar>
                </StackPanel>
            </Grid>
        </DockPanel>
    </DockPanel>
</UserControl>
